home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / basic / RIBlitzLibs.lha / riblitzlibs / docs / RICommoditiesLib.doc < prev    next >
Encoding:
Text File  |  1995-01-29  |  6.2 KB  |  227 lines

  1. -----------------------------------------------------------------------------
  2. ====                 RI Commodities Library V1.2 (C)1994             ====
  3. -----------------------------------------------------------------------------
  4.  
  5.                           Written By Steven Matty
  6.                         ©1994 Leading Edge Software
  7.  
  8.  
  9. Introduction
  10. ============
  11.  
  12. This library allows the easy use of Commodities. It requires Kickstart 2 or
  13. higher.
  14.  
  15.  
  16.  
  17. Function : MakeCommodity
  18. -----------------------------------------------------------------------------
  19. Modes  : Amiga
  20. Syntax : success=MakeCommodity(name$,title$,description$)
  21.  
  22. This command attempts to add your Commodity to the list of commodities.
  23. A return value of -1 indicates success, 0 means failure. (not enough memory)
  24.  
  25. name$ refers to the name of the Commodity and it should be unique. This is
  26. the name that appears when running the Commodity Exchange program.
  27. title$ is the title of your program, e.g. "My Screen Blanker".
  28. description$ is a brief description of your program.
  29.  
  30. The Commodity Exchange program will then have 'name$' in its list of
  31. Commodities and when a user clicks on your commodity, it will display
  32. the title$ and description$. 
  33.  
  34.  
  35. Function : SetHotKey
  36. ----------------------------------------------------------------------------
  37. Modes  : Amiga
  38. Syntax : success=SetHotKey(hotkey#,hotkeydescription$)
  39.  
  40. This will add a hotkey event to your commodity so that after a hotkey
  41. has been pressed you can find out which one.
  42.  
  43. e.g.    success=SetHotKey(0,"lalt lshift a")
  44.  
  45.  
  46. Function : HotKeyHit
  47. ----------------------------------------------------------------------------
  48. Modes  : Amiga
  49. Syntax : hitkeynum=HotKeyHit
  50.  
  51. This will return the number of the hot key which has been hit since the
  52. last 'CommodityEvent' was called, or -1 if no such hotkey has been activated.
  53.  
  54.  
  55. Function : CommodityEvent
  56. ----------------------------------------------------------------------------
  57. Modes  : Amiga
  58. Syntax : anyevent=CommodityEvent
  59.  
  60. This looks to see if either
  61.   a) A hotkey has been pressed
  62.   b) A message from Exchange has been received
  63.  
  64. and returns -1 if such an event occurred, of 0 is nothing has yet happened.
  65. This should be inside a Repeat-Until loop, e.g.
  66.  
  67.   Repeat
  68.     VWait
  69.     ev.l=Event
  70.     ce.l=CommodityEvent
  71.     hk.l=HotKeyHit    ; This must be used after CommodityEvent
  72.   Until ev or ce or hk
  73.  
  74.  
  75. Statement : SetStatus
  76. ---------------------------------------------------------------------------
  77. Modes  : Amiga
  78. Syntax : SetStatus on|off
  79.  
  80. This sets the status of your Commodity to either Active (on) or Inactive
  81. (off) - this can be seen by running the Commodities Exchange program.
  82.  
  83.  
  84. Function : ExchangeMessage
  85. ---------------------------------------------------------------------------
  86. Modes  : Amiga
  87. Syntax : messnum.l=ExchangeMessage
  88.  
  89. This looks to see if the Commodities Exchange has issued you with as message,
  90. e.g. Hide Interface, Show Interface. It returns the message ID of the incoming
  91. message or 0 for no message.
  92.  
  93.  
  94. Functions: CxAppear
  95. -------------------------------------------------------------------------------
  96. Modes : Amiga
  97.  
  98. This is used in conjunction with ExchangeMessage, ie
  99.  
  100.   em.l=ExchangeMessage
  101.   Select em
  102.     Case CxAppear
  103.       Gosub _appear
  104.     Case CxDisAppear
  105.             Gosub _disappear
  106.         End Select
  107.  
  108. The functions merely return the ID value associated with that particular
  109. Commodities Exchange message.
  110.  
  111.  
  112. Functions: CxDisAppear
  113. -------------------------------------------------------------------------------
  114. Modes : Amiga
  115.  
  116. This is used in conjunction with ExchangeMessage, see CxAppear for more
  117. information.
  118.  
  119.  
  120. Functions: CxEnable
  121. -------------------------------------------------------------------------------
  122. Modes : Amiga
  123.  
  124. This is used in conjunction with ExchangeMessage, see CxAppear for more
  125. information.
  126.  
  127.  
  128. Functions: CxDisable
  129. -------------------------------------------------------------------------------
  130. Modes : Amiga
  131.  
  132. This is used in conjunction with ExchangeMessage, see CxAppear for more
  133. information.
  134.  
  135.  
  136. Functions: CxKill
  137. -------------------------------------------------------------------------------
  138. Modes : Amiga
  139.  
  140. This is used in conjunction with ExchangeMessage, see CxAppear for more
  141. information.
  142.  
  143.  
  144. Functions: CxChangeList
  145. -------------------------------------------------------------------------------
  146. Modes : Amiga
  147.  
  148. This is used in conjunction with ExchangeMessage, see CxAppear for more
  149. information.
  150.  
  151.  
  152. Functions: CxUnique
  153. -------------------------------------------------------------------------------
  154. Modes : Amiga
  155.  
  156. This is used in conjunction with ExchangeMessage, see CxAppear for more
  157. information.
  158.  
  159.  
  160. Functions: ExchangeAppear
  161. -------------------------------------------------------------------------------
  162. Modes : Amiga
  163.  
  164. To be used in conjunction with ExchangeMessage, ie
  165.  
  166.   em.l=ExchangeMessage
  167.   If em
  168.     If ExchangeAppear then Gosub _appear
  169.     If ExchangeDisAppear then Gosub _dispappear
  170.   EndIf
  171.  
  172. This is intended as an alternative way of acting upon Exchange Messages.
  173.  
  174.  
  175. Functions: ExchangeDisAppear
  176. -------------------------------------------------------------------------------
  177. Modes : Amiga
  178.  
  179.  
  180. To be used in conjunction with ExchangeMessage, see ExchangeAppear for more
  181. information on usage.
  182.  
  183.  
  184. Functions: ExchangeEnable
  185. -------------------------------------------------------------------------------
  186. Modes : Amiga
  187.  
  188.  
  189. To be used in conjunction with ExchangeMessage, see ExchangeAppear for more
  190. information on usage.
  191.  
  192.  
  193. Functions: ExchangeDisable
  194. -------------------------------------------------------------------------------
  195. Modes : Amiga
  196.  
  197.  
  198. To be used in conjunction with ExchangeMessage, see ExchangeAppear for more
  199. information on usage.
  200.  
  201.  
  202. Functions: ExchangeKill
  203. -------------------------------------------------------------------------------
  204. Modes : Amiga
  205.  
  206.  
  207. To be used in conjunction with ExchangeMessage, see ExchangeAppear for more
  208. information on usage.
  209.  
  210.  
  211. Functions: ExchangeChangeList
  212. -------------------------------------------------------------------------------
  213. Modes : Amiga
  214.  
  215.  
  216. To be used in conjunction with ExchangeMessage, see ExchangeAppear for more
  217. information on usage.
  218.  
  219.  
  220. Functions: ExchangeUnique
  221. -------------------------------------------------------------------------------
  222. Modes : Amiga
  223.  
  224.  
  225. To be used in conjunction with ExchangeMessage, see ExchangeAppear for more
  226. information on usage.
  227.